package com.rxyb.trade.constants;

public class YinshangConstants {

    /**
     * 成功
     */
    public static final String SUCCESS = "SUCCESS";
    /**
     * 没有成功下单
     */
    public static final String NO_ORDER = "NO_ORDER";
    /**
     * 没有成功下单
     */
    public static final String NEW_ORDER = "NEW_ORDER";

    /**
     * 不明确的交易状态
     */
    public static final String UNKNOWN = "UNKNOWN";
    /**
     * 在指定时间段内未支付时关闭的交易;在交易完成全额退款成功时关闭的交易;支付失败的交易
     */
    public static final String TRADE_CLOSED = "TRADE_CLOSED";
    /**
     * 交易创建，等待买家付款
     */
    public static final String WAIT_BUYER_PAY = "WAIT_BUYER_PAY";
    /**
     * 支付成功
     */
    public static final String TRADE_SUCCESS = "TRADE_SUCCESS";
    /**
     * 订单转入退货流程
     */
    public static final String TRADE_REFUND = "TRADE_REFUND";
    /**
     * 微信支付
     */
    public static final String MSG_TYPE_WXPAY = "WXPay.jsPay";
    /**
     * 退款
     */
    public static final String MSG_TYPE_REFUND = "refund";
    /**
     * 支付查询
     */
    public static final String MSG_TYPE_QUERY = "query";
    /**
     * 订单关闭
     */
    public static final String MSG_TYPE_CLOSE = "close";

    /**
     * 等待退款处理：duyh定义
     */
    public static final String WAIT_REFUND = "WAIT_REFUND";
    /**
     * 订单超时时间（分钟）：duyh定义
     */
    public static final int ORDER_TIME_OUT_MIN = 15;

    /**
     * 通讯是否成功
     *
     * @param errCode
     * @return
     */
    public static boolean isSucc(String errCode) {
        if (SUCCESS.equals(errCode)) {
            return true;
        }
        return false;
    }
}
